The archive file Replication_Files.zip contains all of the files necessary to replication the preparation of data, estimation, and analysis. There are three directories: Data, Regular, and Shift.  The Shift directory contains the analysis which allows North Carolina, Massachusetts, and Georgia to switch their positions on proportional representation.  

Subdirectories of Regular and Shift are Analysis, Estimation, output, and Preparation.  Preparation contains prepare_july16_2D.R (all files in the Shift directory contain an additional _shift in the filename), which reads the data (yeanay.csv and votes_data.csv, located in the Data directory) and prepares the data and starting values (only on the x's; theta and delta starting values generated within WinBUGS 1.4).  Estimation contains the WinBUGS data and starting value files, as well as the WinBUGS code july16_2d.bugs. output contains the coda index and sample files. Analysis contains all of the files necessary for replicating the figures, tables and calculations for the paper.  

AuxiliaryFunctions contain two functions written by researchers.  The first, writeDatafileR.txt, downloaded from 
http://www.public.iastate.edu/~alicia/stat544/writeDatafileR.txt, is used to write out the data from R in WinBUGS format.  The second, hpd.r, written by Simon Jackman, calculates highest posterior density intervals (assuming unimodal distributions, which is true for all of the marginal posterior distributions in our analysis).   